package com.aletto.general_store.utils.watchers;

import androidx.recyclerview.widget.RecyclerView;

public class RecyclerViewObserver extends RecyclerView.AdapterDataObserver implements Observer {

    private IRule rule;
    private Subject subject;

    @Override
    public void bind(Subject subject, IRule rule) {
        this.rule = rule;
        this.subject = subject;
    }

    @Override
    public void onChanged() {
        subject.validation(this, rule.validation());
    }

    @Override
    public void update() {
        // 不使用
    }

}
